﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace _708_PDOP_Console
{
   public class PDOP
    {
        [DllImport("J2KECFDLL.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "?ECI2ECF@@YAXOQEAO0@Z")]
        public static extern void ECI2ECF(double mjd, double[] ECFpos, double[] ECIpos);

        public static string getXYZ(double mjd, double[] input)
        {
            double[] output = new double[3];
            try
            {
                ECI2ECF(mjd, input, output);
            }
            catch (Exception ex)
            {
                Console.WriteLine("ECI3ECF方法出现异常:" + ex);
            }
            return output[0] + "," + output[1] + "," + output[2];
        }
    }
}
